<?php
namespace Home\Controller;
use Think\Controller;

class FriendsController extends CommonController {

    public function mydynamic(){
        
        //获取用户发布的动态信息
        $openid=session("weixin_openid");
        $userdata = $this->getinfobyopenid(session("weixin_openid"));
        $model=M();   
        $sql="select * from kl_user_sign us,kl_user u where us.user=u.openid and u.openid='{$openid}'";
        // $sql="select * from kl_user_sign us,kl_user u where us.user=u.openid and u.openid='o9Hr_syQN_1HPN9KLr7pqwwYwCvM'";
        $info=$model->query($sql);
        // $images = explode(',', $info['image']);  
        //membercache初始化
        $mem = memcache_init();
        // //获取存在其中的access_token值
        $access_token = $mem->get(APPSECRET);

        $this->assign("token",$access_token);
        $this->assign('info',$info);
        $this->assign("user",$userdata);
        $this->display("friends");

    }
}